
<include file='Index/header' /></head>
<script type="text/javascript">
$(document).ready(function(){
 $.formValidator.initConfig({autotip:true,formid:"myform",onerror:function(msg){}});
 
 $("#picurl").formValidator({onshow:"请上传广告图",onfocus:"请上传广告图"}).inputValidator({min:1,onerror:"请上传广告图"})
 
 })
</script>

<body>
<div class="add-tab" style="border:0;">
	<a href="javascript:location.reload();" style="float:right;" class="f5">刷新</a>
	<a href="javascript:window.history.go(-1);" style="float:right; margin-right:5px;" class="back">&lt;返回</a>
	<div class="at_tab">
		<a href="javascript:;" class="cur"><i><if condition="ACTION_NAME eq 'add'">添加广告<else/>编辑广告</if></i></a> | 
		<a href="<{:U('index',array('id'=>''))}><if condition="ACTION_NAME eq 'add'"><{$Think.get.id}><else/><{$info['cid']}></if>"><i>广告管理</i></a>

	</div>
	<div class="clearall"></div>
</div>
<!--table-list-->
<div class="table-edit ">
	
	<form method="post" id="myform" action="<{:U('send')}>">
	<div class="table-edit_form">
		<div  class="te_tab_c">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" class="table-edit_tb">
			<tbody>
			<tr>
				<th width="200">所属广告位：</th>
				<td>
					
					<if condition="ACTION_NAME eq 'edit'">
						<{:type('ad_type',$info['cid'],1)}>
							<input type="hidden" value="<{$info['cid']}>" id="cid" name="info[cid]">
						<else/>
							<{:type('ad_type',$_GET['id'],1)}>
							<input type="hidden" value="<{$Think.get.id}>" id="cid" name="info[cid]">
					</if>
					
					
				</td>
			</tr>			
			<tr>
				<th>名称：</th>
				<td><input type="text" class="sys_text" name="info[title]" id="title"  value="<{$info['title']|escapeshow=###}>"></td>
			</tr>
			<tr>
				<th>缩略图：</th>
				<td><a style="padding:0;margin:0; float:left; margin-right:10px;" target="_blank" href="<{$info['picurl']}>" id="picurl_link"><img id="picurl_img" src="<{$info['picurl']}>" style="width:auto;height:auto; max-width:100px; max-height:80px;" /></a>
				<span style="float:left;"><input type="text" class="sys_text sys_text350" style="margin-bottom:5px;" name="info[picurl]" id="picurl" value="<{$info['picurl']}>"  /><br>
<input type="button" class="sys_btn" value="上传图片" onClick="getuploadify('uploadify','缩略图上传','image','image',1,'<{:C(cfg_max_file_size)}>','picurl')" />	
<script>
			$(function(){
				$("#picurl").change(function(){
					var thisval=$(this).val();
					$("#picurl_link").attr("href",thisval);
					$("#picurl_img").attr("src",thisval);
				});
				
			});
			</script>
</td>
			</tr>			
			<tr>
				<th>链接：</th>
				<td><input type="text" class="sys_text" name="info[url]" id="siteurl"  value="<{$info['url']|escapeshow=###}>"></td>
			</tr>			
			<tr>
				<th>排序：</th>
				<td><input type="text" class="sys_text" name="info[orderid]" id="orderid" value="<{$info['orderid']|intval=###}>" /></td>
			</tr>			
			<tr>
				<th>是否显示：</th>
				<td>
					<label><input type="checkbox"   value="1" name="info[checkinfo]"  <if condition="$info['checkinfo']  eq '1' "> checked="checked" </if> /> 不显示 </label> 
				</td>
			</tr>

			</tbody>
		    </table>
		</div>

	</div>
	<div class="tools-edit">
		<table cellpadding="0" cellspacing="0" border="0" width="100%" class="tools-list_tb">
			<tr>
				<th>&nbsp;</th>
				<td>
					<input type="submit" class="sys_blue_btn" value="提交" /> 
					<input type="hidden" value="<{$info['id']}>" name="info[id]">
					<input type="hidden" value="send" name="action">
				</td>
			</tr>
		</table>
	</div>
	</form>
</div>
<!--/table-list-->




</body>
</html>
